export {}
class Person{
    name:string;
    age:number
    constructor(name:string,age:number){
        this.name = name
        this.age = age
    }
    getName():string{
        return this.name
    }
    setName(name:string):void{
        this.name = name
    }
}
//子继承父类
class Student extends Person{
    stuNo:number;
    constructor(name:string,age:number,stuNo:number) {
        super(name,age);
        this.stuNo = stuNo
    }
    getNo(){
        return this.stuNo
    }
}
let s1 = new Student('xx',11,1)
console.log(s1);
